package com.bbm.service.impl;


import com.bbm.entity.HouseImg;
import com.bbm.entity.vo.ResponseResult;
import com.bbm.mapper.HouseImgMapper;
import com.bbm.service.HouseImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * (HouseImg)表服务实现类
 *
 * @author lionkliu
 * @since 2024-02-18 18:04:10
 */
@Service("houseImgService")
public class HouseImgServiceImpl implements HouseImgService {
    @Autowired
    private HouseImgMapper houseImgMapper;

    @Override
    public ResponseResult selectPage(Integer pageNum, Integer pageSize) {
        return null;
    }

    @Override
    public ResponseResult selectOne(Integer id) {
        return null;
    }

    @Override
    public ResponseResult deleteById(Integer id) {
        return null;
    }

    @Override
    public ResponseResult updateOne(HouseImg houseImg) {
        return null;
    }

    @Override
    public ResponseResult getImgListById(Integer id) {
        List<HouseImg> houseImgList = houseImgMapper.getImgListById(id);
        List<String> list = houseImgList.stream().map(HouseImg::getImg).collect(Collectors.toList());
        return ResponseResult.okResult(list);
    }

    @Override
    public ResponseResult insertOne(HouseImg houseImg) {
        return ResponseResult.okResult();
    }
}

